# https://www.runoob.com/python/python-func-getattr.html

class Father:
    def test_a(self):
        print('a')

    def test_b(self):
        print('b')

    def test_c(self):
        print('c')

    def index(self):
        print('index')

# 遍历class里面的所有用例，返回属性值
for testcase in dir(Father()):
# 判断是否以test开头
    if testcase.startswith("test"):
# 返回所有以test开头的用例
        father = getattr(Father(), testcase)
# 判断他们是否为函数，是函数则执行
        if callable(father):
            father()


